package com.ksd.modules.area.controller;

import com.ksd.common.core.result.R;
import com.ksd.modules.area.entity.MayaProvince;
import com.ksd.modules.area.service.IMayaProvinceService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author Auto Generator
 * @since 2023-10-12
 */
@Api(tags = "区域管理-GM")
@RestController
@RequestMapping("/admin/province")
public class MayaProvinceController  {
    @Autowired
    IMayaProvinceService provinceService;

    /**
     * 根据省id搜索市级
     */
    @ApiOperation(value = "获取所有省区域")
    @RequestMapping(value = "/list", method = RequestMethod.POST, consumes = "application/json")
    public R<List<MayaProvince>> list() {

        return R.success(provinceService.list());
    }
}
